The JPEG and MPEG international compression standards have been widely adopted for the efficient storage and transmission of still images and image sequences. A common aspect of these compression standards is that they use the discrete cosine transform (DCT) as a key component in the compression process. The DCT decomposes the original pixel values into a frequency domain representation (i.e., DCT coefficients), which can be quantized and efficiently encoded. Specifically, JPEG and MPEG apply the DCT to contiguous, nonoverlapping 8×8 blocks of pixels to produce 64 DCT coefficients for each block. Because the DCT coefficients are quantized, JPEG and MPEG are lossy compression methods, i.e., a compressed/decompressed image will not be identical to the original uncompressed image.
In some applications, it may be necessary to recompress an image or image sequence that has been previously compressed with JPEG or MPEG. Multiple compression cycles can introduce additional quality degradations, even if the same compression parameters are used for each cycle. The degradations that occur in multiple compression cycles have been described in the technical literature, including “Image quality with reiterative JPEG compression,” J. Kinoshita and T. Yamamuro, J. Imaging Science and Technology, Vol. 39(4), pp. 306-312, 1995; and “Compression of 10-bit video using the tools of MPEG-2,” A. T. Erdem and M. I. Sezan, Signal Processing: Image Communications, Vol. 7, pp. 27-56, 1995. In addition, other technical papers have described methods for minimizing quality loss when it is necessary to change the compression parameters between compression cycles (e.g., transcoding for a reduced bit rate). These papers include “Requantization for transcoding of MPEG-2 intraframes,” O. Werner, IEEE Trans. Image Processing, Vol. 8(2), pp. 179-191, 1999; and “Low-complexity rate-distortion optimal transcoding of MPEG I-frames,” R. L. Lagendijk, E. D. Frimout, and J. Biemond, Signal Processing: Image Communications, Vol. 15, pp. 531-544, 2000.
An implicit assumption in all of the previously referenced prior art is that the DCT blocks in each compression cycle are aligned with the DCT blocks in the previous cycle. However, block misalignment can occur when an image is cropped between compression cycles. It has been shown in “A study of multiple JPEG compression cycles in medical images,” S. Young, P. W. Jones, and D. H. Foos, Proc. SPIE Medical Imaging, 3335, pp. 336-347, 1998, that a misalignment of the DCT blocks between compression cycles can lead to significant quality loss. The quality degradations introduced by multiple compression cycles will be minimized only when the DCT block boundaries are aligned in each cycle. This is true regardless of the specific compression parameters that are selected for each compression cycle.
Alignment of the DCT block boundaries is straightforward if the compressed file is available, since it can generally be assumed that the DCT blocks begin in the upper left corner of each image as per the methods defined in the JPEG and MPEG standards. However, in some cases, only a decompressed image is available, and this decompressed image may have been cropped at some point in its processing history. Cropping can destroy the conventional alignment of the DCT block boundaries because alignment will be maintained only if the cropping is done at integer multiples of 8 pixels in both the horizontal and vertical directions (because of the 8×8 DCT that is used in JPEG and MPEG). Thus, it is advantageous to have a method for determining the DCT block boundaries when only a decompressed image is available.
The determination of DCT block boundaries is also important in systems that attempt to improve the image quality of highly compressed JPEG images and MPEG image sequences. In such highly compressed images, severe quantization of the DCT coefficients leads to blocking artifacts as a result of the block-based nature of the 8×8 DCT. In order to reduce these blocking artifacts (a process known as “deblocking”), it is necessary to know the position of the DCT block boundaries. Again, if only a decompressed image is available, a method is required to determine these block boundaries.
Methods for reducing blocking artifacts in highly compressed images often include blockiness detection metrics that can be used to locate block boundaries. Papers from the technical literature that describe such techniques include “Blocking artifact reduction in image compression with block boundary discontinuity criterion,” B. Jeon and J. Jeong, IEEE Trans. Circuits Systems Video Technology, Vol. 8(3), pp. 345-357, 1988; ‘Reduction of blocking effect in DCT-coded images based on a visual perception criterion,” F. -X. Coudoux, M. Gazalet, and P. Corlay, Signal Processing: Image Communications, Vol. 11, pp. 179-186, 1998; and “Frequency domain measurements of blockiness in MPEG-2 coded video,” K. T. Tan and M. Ghanbari, IEEE Proc. Int. Conf. Image Processing, 2000. However, these methods are suitable only when distinct and severe blocking artifacts are present in the decompressed image. They will not work for determining the DCT block boundaries of cropped images at low to moderate compression levels, as described previously.
It is therefore advantageous to have a method for determining the DCT block boundaries of decompressed JPEG and MPEG images, regardless of the degree of compression that has been applied to the images.